import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
	{//首页
		path: '/',
		name: 'Index',
		component: () => import('../views/Index.vue'),
		meta: {
			title: '黄河人才网-首页',
			content:{
				keywords:'黄河人才网-首页',
				description:'黄河人才网-首页',
			},
		}
	},
	{//登陆注册
		path: '/login',
		name: 'Login',
		component: () => import('../views/Login.vue'),
		meta: {
			title: '黄河人才网-登录注册',
			content: {
				keywords: '黄河人才网-登录注册',
				description: '黄河人才网-登录注册',
			},
		}
	},
	/*{//登录第一份简历
		path: '/firstResume',
		name: 'FirstResume',
		component: () => import('../views/FirstResume.vue'),
		meta: {
			title: '黄河人才网-简历信息',
			content:{
				keywords:'黄河人才网-简历信息',
				description:'黄河人才网-简历信息',
			},
		}
	},*/
	{//校园招聘
		path: '/school',
		name: 'School',
		component: () => import('../views/school/School.vue'),
		meta: {
			title: '黄河人才网-校园招聘',
			content:{
				keywords:'黄河人才网-校园招聘',
				description:'黄河人才网-校园招聘',
			},
		}
	},
	{//新闻资讯
		path: '/news',
		name: 'News',
		component: () => import('../views/news/News.vue'),
		meta: {
			title: '黄河人才网-新闻资讯',
			content:{
				keywords:'黄河人才网-新闻资讯',
				description:'黄河人才网-新闻资讯',
			},
		}
	},
	{//直播带岗
		path: '/broadcast',
		name: 'Broadcast',
		component: () => import('../views/broadcast/Broadcast.vue'),
		meta: {
			title: '黄河人才网-直播带岗',
			content:{
				keywords:'黄河人才网-直播带岗',
				description:'黄河人才网-直播带岗',
			},
		}
	},
	{//新闻资讯详情
		path: '/news/newsDetails',
		name: 'NewsDetails',
		component: () => import('../views/news/NewsDetails.vue'),
		meta: {
			title: '黄河人才网-新闻资讯',
			content:{
				keywords:'黄河人才网-新闻资讯',
				description:'黄河人才网-新闻资讯',
			},
		}
	},
	{//专场招聘列表
		path: '/special',
		name: 'Special',
		component: () => import('../views/special/Special.vue'),
		meta: {
			title: '黄河人才网-专场招聘',
			content:{
				keywords:'黄河人才网-专场招聘',
				description:'黄河人才网-专场招聘',
			},
		}
	},
	{//专场招聘首页
		path: '/special/specialIndex',
		name: 'SpecialIndex',
		component: () => import('../views/special/SpecialIndex.vue'),
		meta: {
			title: '黄河人才网-专场招聘首页',
			content:{
				keywords:'黄河人才网-专场招聘首页',
				description:'黄河人才网-专场招聘首页',
			},
		}
	},
	{//专场招聘职位
		path: '/special/specialIndexJob',
		name: 'SpecialIndexJob',
		component: () => import('../views/special/SpecialIndexJob.vue'),
		meta: {
			title: '黄河人才网-专场招聘职位',
			content:{
				keywords:'黄河人才网-专场招聘职位',
				description:'黄河人才网-专场招聘职位',
			},
		}
	},
	{//专场招聘-直播带岗
		path: '/special/specialIndexLiveCommerce',
		name: 'specialIndexLiveCommerce',
		component: () => import('../views/special/specialIndexLiveCommerce.vue'),
		meta: {
			title: '黄河人才网-直播带岗',
			content:{
				keywords:'黄河人才网-直播带岗',
				description:'黄河人才网-直播带岗',
			},
		}
	},
	{//职位
		path: '/job',
		name: 'Job',
		component: () => import('../views/job/Job.vue'),
		meta: {
			title: '黄河人才网-职位',
			content:{
				keywords:'黄河人才网-职位',
				description:'黄河人才网-职位',
			},
		}
	},
	{//职位详情
		path: '/jobDetails',
		name: 'JobDetails',
		component: () => import('../views/job/JobDetails.vue'),
		meta: {
			title: '黄河人才网-职位详情',
			content:{
				keywords:'黄河人才网-职位详情',
				description:'黄河人才网-职位详情',
			},
		}
	},
	{//公司主页
		path: '/company',
		name: 'Company',
		component: () => import('../views/company/Company.vue'),
		meta: {
			title: '黄河人才网-公司主页',
			content:{
				keywords:'黄河人才网-公司主页',
				description:'黄河人才网-公司主页',
			},
		}
	},
	{//公司招聘职位
		path: '/companyJob',
		name: 'CompanyJob',
		component: () => import('../views/company/CompanyJob.vue'),
		meta: {
			title: '黄河人才网-公司职位',
			content:{
				keywords:'黄河人才网-公司职位',
				description:'黄河人才网-公司职位',
			},
		}
	},
	{//个人中心
		path: '/person',
		name: 'Person',
		component: () => import('../views/person/Person.vue'),
		meta: {
			title: '黄河人才网-个人中心',
			content:{
				keywords:'黄河人才网-个人中心',
				description:'黄河人才网-个人中心',
			},
		}
	},
	{//个人中心 在线简历
		path: '/person/resume',
		name: 'PersonResume',
		component: () => import('../views/person/PersonResume.vue'),
		meta: {
			title: '黄河人才网-在线简历',
			content:{
				keywords:'黄河人才网-在线简历',
				description:'黄河人才网-在线简历',
			},
		}
	},
	{//个人中心 英文简历
		path: '/person/resumeEn',
		name: 'PersonResumeEn',
		component: () => import('../views/person/PersonResumeEn.vue'),
		meta: {
			title: '黄河人才网-英文简历',
			content:{
				keywords:'黄河人才网-英文简历',
				description:'黄河人才网-英文简历',
			},
		}
	},
	{//个人中心 预览简历
		path: '/person/resumeLook',
		name: 'PersonResumeLook',
		component: () => import('../views/person/PersonResumeLook.vue'),
		meta: {
			title: '黄河人才网-预览简历',
			content:{
				keywords:'黄河人才网-预览简历',
				description:'黄河人才网-预览简历',
			},
		}
	},
	{//个人中心 预览英文简历
		path: '/person/resumeEnLook',
		name: 'PersonResumeEnLook',
		component: () => import('../views/person/PersonResumeEnLook.vue'),
		meta: {
			title: '黄河人才网-预览简历',
			content:{
				keywords:'黄河人才网-预览简历',
				description:'黄河人才网-预览简历',
			},
		}
	},
	{//个人中心 投递状态
		path: '/person/sendStatus',
		name: 'PersonSendStatus',
		component: () => import('../views/person/PersonSendStatus.vue'),
		meta: {
			title: '黄河人才网-个人中心',
			content:{
				keywords:'黄河人才网-个人中心',
				description:'黄河人才网-个人中心',
			},
		}
	},
	{//个人中心 账号设置 密码修改
		path: '/person/settingPassWord',
		name: 'PersonSettingPassWord',
		component: () => import('../views/person/PersonSettingPassWord.vue'),
		meta: {
			title: '黄河人才网-账号设置',
			content:{
				keywords:'黄河人才网-账号设置',
				description:'黄河人才网-账号设置',
			},
		}
	},
	{//个人中心 账号设置 手机号修改
		path: '/person/settingPhone',
		name: 'PersonSettingPhone',
		component: () => import('../views/person/PersonSettingPhone.vue'),
		meta: {
			title: '黄河人才网-账号设置',
			content:{
				keywords:'黄河人才网-账号设置',
				description:'黄河人才网-账号设置',
			},
		}
	},
	{//个人中心 账号设置 绑定微信号
		path: '/person/settingWechat',
		name: 'PersonSettingWechat',
		component: () => import('../views/person/PersonSettingWechat.vue'),
		meta: {
			title: '黄河人才网-账号设置',
			content:{
				keywords:'黄河人才网-账号设置',
				description:'黄河人才网-账号设置',
			},
		}
	},
	{//个人中心 消息中心 应聘进度通知
		path: '/person/message',
		name: 'PersonMessage',
		component: () => import('../views/person/PersonMessage.vue'),
		meta: {
			title: '黄河人才网-消息中心',
			content:{
				keywords:'黄河人才网-消息中心',
				description:'黄河人才网-消息中心',
			},
		}
	},
	{//个人中心 消息中心 系统通知
		path: '/person/message1',
		name: 'PersonMessage1',
		component: () => import('../views/person/PersonMessage1.vue'),
		meta: {
			title: '黄河人才网-消息中心',
			content:{
				keywords:'黄河人才网-消息中心',
				description:'黄河人才网-消息中心',
			},
		}
	},
	{//关于我们
		path: '/about',
		name: 'About',
		component: () => import('../views/about/About.vue'),
		meta: {
			title: '黄河人才网-关于我们',
			content:{
				keywords:'黄河人才网-关于我们',
				description:'黄河人才网-关于我们',
			},
		}
	},
	{//联系我们
		path: '/contact',
		name: 'Contact',
		component: () => import('../views/about/Contact.vue'),
		meta: {
			title: '黄河人才网-联系我们',
			content:{
				keywords:'黄河人才网-联系我们',
				description:'黄河人才网-联系我们',
			},
		}
	},
	{//用户协议
		path: '/agreement',
		name: 'Agreement',
		component: () => import('../views/about/Agreement.vue'),
		meta: {
			title: '黄河人才网-用户协议',
			content:{
				keywords:'黄河人才网-用户协议',
				description:'黄河人才网-用户协议',
			},
		}
	},
	{//隐私协议
		path: '/privacy',
		name: 'Privacy',
		component: () => import('../views/about/Privacy.vue'),
		meta: {
			title: '黄河人才网-隐私政策',
			content:{
				keywords:'黄河人才网-隐私政策',
				description:'黄河人才网-隐私政策',
			},
		}
	},
	{//隐私协议
		path: '/legal',
		name: 'Legal',
		component: () => import('../views/about/Legal.vue'),
		meta: {
			title: '黄河人才网-法律声明',
			content:{
				keywords:'黄河人才网-法律声明',
				description:'黄河人才网-法律声明',
			},
		}
	},
	{//绑定微信-手机
		path: '/bindWechat',
		name: 'bindWechat',
		component: () => import('../views/bindWechat/bindWechat.vue'),
		meta: {
			title: '黄河人才网-绑定微信',
			content:{
				keywords:'黄河人才网-绑定微信',
				description:'黄河人才网-绑定微信',
			},
		}
	},
	{//404
		path: '/404',
		name: '404',
		component: () => import('../views/404.vue'),
	},
	{//没有路由
		path: '*',
		component: () => import('../views/Index.vue')
	},
]

const router = new VueRouter({
	routes,
	mode: "history",
	scrollBehavior(to, from, savedPosition) { //to top
        return { x: 0, y: 0 }
    }
})

const originalPush = VueRouter.prototype.push
   VueRouter.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}

export default router
